Skip to content

Conversation

@j-ororke
Copy link
Contributor

@j-ororke j-ororke commented Sep 20, 2025

Summary

This PR creates the TC_IDM_3_2 Python test module to validate Write Response Actions from the DUT to the TH.

Includes:

  • Implements the Timed Request validation for the IDM_3_2 test module (Step 7).
  • Removed SuppressResponse handling, which has been split into a separate PR for independent review: #41590
  • Validates correct behavior for Timed Write Requests as defined in the Matter specification.
  • Ensures accurate handling of Write Requests under Timed Write Interactions and adherence to chunking constraints per spec.

Thank you @bzbarsky-apple and @cecille for the feedback and guidance on this!

Related issues

  • Resolves Task #322
  • Created Test Plan PR: 5539
  • New SuppressResponse handling split PR: #41590
  • SuppressResponse behavior issue: #41227

Testing

Adds Python Test: TC_IDM_3_2.py
Validated locally using chip-all-clusters-app on WSL Linux using following command:

./scripts/tests/run_python_test.py --factory-reset --app out/linux-x64-all-clusters/chip-all-clusters-app --app-args "--discriminator 1234 --KVS kvs1" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 0" --script  src/python_testing/TC_IDM_3_2.py 
  • Confirmed Timed Write Requests (Step 7) execute and pass successfully.

Notes

  • PR scope now limited to Timed Request logic only.
  • Ready for final review once all feedback is addressed.
  • SuppressResponse test step 4 will be reintroduced via PR #41590 once issues are resolved.

Readability checklist

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

- Creating test module for Task #[322](project-chip/matter-test-scripts#322)
- Created updated test plan to remove test step 1 here: [5539](CHIP-Specifications/chip-test-plans#5539)
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively automates the manual test case TC_IDM_3_2 by creating a new Python test module. The conversion from YAML to a Python script is well-executed and covers the intended test scenarios for write response actions. I've identified one critical issue that would cause a test failure and a couple of medium-severity issues related to code style and a typo. Overall, this is a great step towards automating our test suite.

j-ororke and others added 4 commits September 19, 2025 22:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions
Copy link

PR #41066: Size comparison from b779ea9 to 6c3d0aa

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section b779ea9 6c3d0aa change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 552918 552918 0 0.0
RAM 204904 204904 0 0.0
lock CC3235SF_LAUNCHXL FLASH 585626 585626 0 0.0
RAM 205136 205136 0 0.0
realtek light-switch-app rtl8777g FLASH 704080 704080 0 0.0
RAM 106692 106692 0 0.0
lighting-app rtl8777g FLASH 755224 755224 0 0.0
RAM 127040 127040 0 0.0
stm32 light STM32WB5MM-DK FLASH 467668 467668 0 0.0
RAM 141128 141128 0 0.0

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

PR #41066: Size comparison from b779ea9 to 3ddd434

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section b779ea9 3ddd434 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1104392 1104392 0 0.0
RAM 178706 178706 0 0.0
bl702 lighting-app bl702+eth FLASH 658764 658764 0 0.0
RAM 134769 134769 0 0.0
bl702+wifi FLASH 834832 834832 0 0.0
RAM 124237 124237 0 0.0
bl706+mfd+rpc+littlefs FLASH 1067842 1067842 0 0.0
RAM 117077 117077 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 898062 898062 0 0.0
RAM 105420 105420 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 980738 980738 0 0.0
RAM 109572 109572 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 767976 767976 0 0.0
RAM 103128 103128 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 779604 779604 0 0.0
RAM 108288 108288 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 725836 725836 0 0.0
RAM 97220 97220 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 710328 710328 0 0.0
RAM 97436 97436 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 552918 552918 0 0.0
RAM 204904 204904 0 0.0
lock CC3235SF_LAUNCHXL FLASH 585626 585626 0 0.0
RAM 205136 205136 0 0.0
efr32 lock-app BRD4187C FLASH 959560 959560 0 0.0
RAM 126148 126148 0 0.0
BRD4338a FLASH 754848 754848 0 0.0
RAM 255456 255456 0 0.0
window-app BRD4187C FLASH 1053668 1053660 -8 -0.0
RAM 122344 122344 0 0.0
esp32 all-clusters-app c3devkit DRAM 102912 102912 0 0.0
FLASH 1776582 1776582 0 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915200 915200 0 0.0
RAM 153288 153288 0 0.0
nxp contact mcxw71+release FLASH 690304 690304 0 0.0
RAM 61376 61376 0 0.0
lighting mcxw71+release FLASH 722104 722104 0 0.0
RAM 68036 68036 0 0.0
lock mcxw71+release FLASH 768912 768912 0 0.0
RAM 61740 61740 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1666028 1666028 0 0.0
RAM 212972 212972 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1585716 1585716 0 0.0
RAM 210236 210236 0 0.0
light cy8ckit_062s2_43012 FLASH 1454780 1454780 0 0.0
RAM 196984 196984 0 0.0
lock cy8ckit_062s2_43012 FLASH 1487108 1487108 0 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6200+debug FLASH 831160 831160 0 0.0
RAM 127512 127512 0 0.0
lock-app qpg6200+debug FLASH 768228 768228 0 0.0
RAM 118480 118480 0 0.0
realtek light-switch-app rtl8777g FLASH 704080 704080 0 0.0
RAM 106692 106692 0 0.0
lighting-app rtl8777g FLASH 755224 755224 0 0.0
RAM 127040 127040 0 0.0
stm32 light STM32WB5MM-DK FLASH 467668 467668 0 0.0
RAM 141128 141128 0 0.0
telink bridge-app tl7218x FLASH 708642 708642 0 0.0
RAM 91164 91164 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 797868 797868 0 0.0
RAM 41736 41736 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 789082 789082 0 0.0
RAM 94380 94380 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715904 715904 0 0.0
RAM 52556 52556 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 749210 749210 0 0.0
RAM 71604 71604 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 726050 726050 0 0.0
RAM 35304 35304 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603294 603294 0 0.0
RAM 107172 107172 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 821704 821708 4 0.0
RAM 92776 92776 0 0.0

@codecov
Copy link

codecov bot commented Sep 20, 2025

Codecov Report

❌ Patch coverage is 7.22892% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.03%. Comparing base (bab6726) to head (49c1782).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...rc/controller/python/matter/clusters/attribute.cpp 0.00% 68 Missing ⚠️
src/app/WriteClient.h 35.71% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41066      +/-   ##
==========================================
- Coverage   51.06%   51.03%   -0.04%     
==========================================
  Files        1385     1385              
  Lines      100882   100949      +67     
  Branches    13054    13066      +12     
==========================================
+ Hits        51516    51517       +1     
- Misses      49366    49432      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

PR #41066: Size comparison from b779ea9 to dcd0548

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section b779ea9 dcd0548 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1104392 1104392 0 0.0
RAM 178706 178706 0 0.0
bl702 lighting-app bl702+eth FLASH 658764 658764 0 0.0
RAM 134769 134769 0 0.0
bl702+wifi FLASH 834832 834832 0 0.0
RAM 124237 124237 0 0.0
bl706+mfd+rpc+littlefs FLASH 1067842 1067842 0 0.0
RAM 117077 117077 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 898062 898062 0 0.0
RAM 105420 105420 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 980738 980738 0 0.0
RAM 109572 109572 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 767976 767976 0 0.0
RAM 103128 103128 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 779604 779604 0 0.0
RAM 108288 108288 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 725836 725836 0 0.0
RAM 97220 97220 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 710328 710328 0 0.0
RAM 97436 97436 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 552918 552918 0 0.0
RAM 204904 204904 0 0.0
lock CC3235SF_LAUNCHXL FLASH 585626 585626 0 0.0
RAM 205136 205136 0 0.0
efr32 lock-app BRD4187C FLASH 959560 959560 0 0.0
RAM 126148 126148 0 0.0
BRD4338a FLASH 754848 754848 0 0.0
RAM 255456 255456 0 0.0
window-app BRD4187C FLASH 1053668 1053660 -8 -0.0
RAM 122344 122344 0 0.0
esp32 all-clusters-app c3devkit DRAM 102912 102912 0 0.0
FLASH 1776582 1776582 0 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915200 915200 0 0.0
RAM 153288 153288 0 0.0
nxp contact mcxw71+release FLASH 690304 690304 0 0.0
RAM 61376 61376 0 0.0
lighting mcxw71+release FLASH 722104 722104 0 0.0
RAM 68036 68036 0 0.0
lock mcxw71+release FLASH 768912 768912 0 0.0
RAM 61740 61740 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1666028 1666028 0 0.0
RAM 212972 212972 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1585716 1585716 0 0.0
RAM 210236 210236 0 0.0
light cy8ckit_062s2_43012 FLASH 1454780 1454780 0 0.0
RAM 196984 196984 0 0.0
lock cy8ckit_062s2_43012 FLASH 1487108 1487108 0 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6200+debug FLASH 831160 831160 0 0.0
RAM 127512 127512 0 0.0
lock-app qpg6200+debug FLASH 768228 768228 0 0.0
RAM 118480 118480 0 0.0
realtek light-switch-app rtl8777g FLASH 704080 704080 0 0.0
RAM 106692 106692 0 0.0
lighting-app rtl8777g FLASH 755224 755224 0 0.0
RAM 127040 127040 0 0.0
stm32 light STM32WB5MM-DK FLASH 467668 467668 0 0.0
RAM 141128 141128 0 0.0
telink bridge-app tl7218x FLASH 708642 708642 0 0.0
RAM 91164 91164 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 797868 797868 0 0.0
RAM 41736 41736 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 789082 789082 0 0.0
RAM 94380 94380 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715904 715904 0 0.0
RAM 52556 52556 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 749210 749210 0 0.0
RAM 71604 71604 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 726050 726050 0 0.0
RAM 35304 35304 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603294 603294 0 0.0
RAM 107172 107172 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 821704 821708 4 0.0
RAM 92776 92776 0 0.0

'''

# Read an attribute to get the current DataVersion
test_cluster = Clusters.BasicInformation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could get some odd devices through this test because it's not marked as being for commissionable device, but just for any device with a server. So you might end up with devices that are software components. In that case, they may not have any writable attributes at all. Node label is a really good choice for commissionable nodes. So it totally makes sense to try that one if it exists, but it might not. Realistically, testing data version filters while writing attributes on non-commissionable devices is likely such a corner case that I might argue it's not worth pursuing. Maybe? The challenge here is, of course, we don't really know if the value we're writing is acceptable if it's not node label.

Ok, so proposal for now - just put this into an if / else on the existence of the node label. The else with a fallback can be handled in a follow up.

Copy link
Contributor Author

@j-ororke j-ororke Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Cecille,
I have updated this to continue using the node label as our attribute, but now as you have mentioned above placing it inside of an if exists in attribute_list then do test steps 5 and 6, else it just skips test steps 5 and 6 since we are using the node label for both test steps at this time.
Added the following follow-up task for tracking this: project-chip/matter-test-scripts#693

…e label if check for test steps 5 and 6, and added commissioning test step 0:

- Added plumbing for TIMED_REQUEST_MISMATCH validation in test step 7: Following similar logic as noticed in TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke function
- Added commissioning test step 0
- Added if check for exist of node label attribute to see if we should run test step 5 and 6, else we currently skip these test steps (Until follow-up is implemented)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not check all the FFI bits in here carefully.... I am assuming @cecille will or has.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glanced over this, and seems ok, but did not review carefully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not review this at all; I assume @cecille is handling this.

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

PR #41066: Size comparison from bab6726 to b896bb9

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section bab6726 b896bb9 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106608 1106622 14 0.0
RAM 178874 178874 0 0.0
bl702 lighting-app bl702+eth FLASH 661184 661198 14 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 837296 837310 14 0.0
RAM 124405 124405 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070264 1070278 14 0.0
RAM 117261 117261 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899716 899730 14 0.0
RAM 105524 105524 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983026 983040 14 0.0
RAM 109740 109740 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770644 770652 8 0.0
RAM 103304 103304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782376 782384 8 0.0
RAM 108472 108472 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728204 728212 8 0.0
RAM 97364 97364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712664 712672 8 0.0
RAM 97580 97580 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554294 554302 8 0.0
RAM 205736 205736 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587542 587550 8 0.0
RAM 205832 205832 0 0.0
efr32 lock-app BRD4187C FLASH 963160 963160 0 0.0
RAM 126328 126328 0 0.0
BRD4338a FLASH 756712 756744 32 0.0
RAM 256952 256952 0 0.0
window-app BRD4187C FLASH 1058460 1058484 24 0.0
RAM 122556 122556 0 0.0
esp32 all-clusters-app c3devkit DRAM 102516 102516 0 0.0
FLASH 1827416 1827430 14 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933068 933076 8 0.0
RAM 161313 161313 0 0.0
nxp contact mcxw71+release FLASH 691896 691904 8 0.0
RAM 61496 61496 0 0.0
lighting mcxw71+release FLASH 723400 723408 8 0.0
RAM 68140 68140 0 0.0
lock mcxw71+release FLASH 773664 773672 8 0.0
RAM 61932 61932 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1676628 1676660 32 0.0
RAM 213900 213900 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1593244 1593276 32 0.0
RAM 211108 211108 0 0.0
light cy8ckit_062s2_43012 FLASH 1459788 1459820 32 0.0
RAM 197728 197728 0 0.0
lock cy8ckit_062s2_43012 FLASH 1492340 1492372 32 0.0
RAM 225440 225440 0 0.0
qpg lighting-app qpg6200+debug FLASH 837104 837104 0 0.0
RAM 127708 127708 0 0.0
lock-app qpg6200+debug FLASH 773884 773884 0 0.0
RAM 118684 118684 0 0.0
realtek light-switch-app rtl8777g FLASH 706592 706624 32 0.0
RAM 106904 106904 0 0.0
lighting-app rtl8777g FLASH 757680 757712 32 0.0
RAM 127236 127236 0 0.0
stm32 light STM32WB5MM-DK FLASH 470084 470092 8 0.0
RAM 141304 141304 0 0.0
telink bridge-app tl7218x FLASH 710556 710570 14 0.0
RAM 90544 90544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796910 796924 14 0.0
RAM 41000 41000 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788110 788124 14 0.0
RAM 93644 93644 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 714988 715002 14 0.0
RAM 51844 51844 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748284 748298 14 0.0
RAM 70892 70892 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725140 725154 14 0.0
RAM 34592 34592 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602384 602398 14 0.0
RAM 108904 108904 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820714 820732 18 0.0
RAM 92040 92040 0 0.0

- Remove redundant WriteClient constructor taking only bool parameter
- Merge pychip_WriteClient_TestOnlyWriteAttributesTimedRequestNoTimedAction
  and pychip_WriteClient_TestOnlyWriteAttributesTimedActionNoTimedRequestFlag
  into single pychip_WriteClient_TestOnlyWriteAttributesWithMismatchedTimedRequestField
- Update Python bindings and tests to use unified API

The single test function now takes both timedRequestTimeoutMs and timedRequestFieldValue parameters,
allowing callers to specify exactly what combination they need for each test scenario.
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

PR #41066: Size comparison from bab6726 to 610043b

Full report (3 builds for realtek, stm32)
platform target config section bab6726 610043b change % change
realtek light-switch-app rtl8777g FLASH 706592 706624 32 0.0
RAM 106904 106904 0 0.0
lighting-app rtl8777g FLASH 757680 757712 32 0.0
RAM 127236 127236 0 0.0
stm32 light STM32WB5MM-DK FLASH 470084 470092 8 0.0
RAM 141304 141304 0 0.0

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

PR #41066: Size comparison from ad60c95 to 7eeb60c

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section ad60c95 7eeb60c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106622 1106622 0 0.0
RAM 178874 178874 0 0.0
bl702 lighting-app bl702+eth FLASH 661198 661198 0 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 837310 837310 0 0.0
RAM 124405 124405 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070278 1070278 0 0.0
RAM 117261 117261 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899730 899730 0 0.0
RAM 105524 105524 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983040 983040 0 0.0
RAM 109740 109740 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770652 770652 0 0.0
RAM 103304 103304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782384 782384 0 0.0
RAM 108472 108472 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728212 728212 0 0.0
RAM 97364 97364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712672 712672 0 0.0
RAM 97580 97580 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554226 554226 0 0.0
RAM 205736 205736 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587474 587474 0 0.0
RAM 205832 205832 0 0.0
efr32 lock-app BRD4187C FLASH 963160 963160 0 0.0
RAM 126328 126328 0 0.0
BRD4338a FLASH 756744 756744 0 0.0
RAM 256952 256952 0 0.0
window-app BRD4187C FLASH 1058492 1058484 -8 -0.0
RAM 122556 122556 0 0.0
esp32 all-clusters-app c3devkit DRAM 102516 102516 0 0.0
FLASH 1827430 1827430 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933076 933076 0 0.0
RAM 161313 161313 0 0.0
nxp contact mcxw71+release FLASH 691904 691904 0 0.0
RAM 61496 61496 0 0.0
lighting mcxw71+release FLASH 723408 723408 0 0.0
RAM 68140 68140 0 0.0
lock mcxw71+release FLASH 773672 773672 0 0.0
RAM 61932 61932 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1676564 1676564 0 0.0
RAM 213900 213900 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1593180 1593180 0 0.0
RAM 211108 211108 0 0.0
light cy8ckit_062s2_43012 FLASH 1459724 1459724 0 0.0
RAM 197728 197728 0 0.0
lock cy8ckit_062s2_43012 FLASH 1492276 1492276 0 0.0
RAM 225440 225440 0 0.0
qpg lighting-app qpg6200+debug FLASH 837104 837104 0 0.0
RAM 127708 127708 0 0.0
lock-app qpg6200+debug FLASH 773884 773884 0 0.0
RAM 118684 118684 0 0.0
realtek light-switch-app rtl8777g FLASH 706624 706624 0 0.0
RAM 106904 106904 0 0.0
lighting-app rtl8777g FLASH 757712 757712 0 0.0
RAM 127236 127236 0 0.0
stm32 light STM32WB5MM-DK FLASH 470092 470092 0 0.0
RAM 141304 141304 0 0.0
telink bridge-app tl7218x FLASH 710570 710570 0 0.0
RAM 90544 90544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796924 796924 0 0.0
RAM 41000 41000 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788124 788124 0 0.0
RAM 93644 93644 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715002 715002 0 0.0
RAM 51844 51844 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748298 748298 0 0.0
RAM 70892 70892 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725154 725154 0 0.0
RAM 34592 34592 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602398 602398 0 0.0
RAM 108904 108904 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820728 820732 4 0.0
RAM 92040 92040 0 0.0

Copy link
Contributor

@cecille cecille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor refactor and comment. Once those are sorted, I think this is good to go.

attrs = []
for v in attributes:
if len(v) == 2:
attrs.append(ClusterAttribute.AttributeWriteRequest(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind adding the parameter names here so it's easier to tell what's going on? Is the attribute parameter list supposed to be a union of possible tuples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the parameter names to the AttributeWriteRequest calls and updated the type hint to show it accepts either a 2-tuple or 3-tuple.
A bit clearer now. Thank you!


namespace {
// Helper function to process write attributes data - reduces code duplication
CHIP_ERROR ProcessWriteAttributesData(WriteClient * client, python::PyWriteAttributeData * writeAttributesData,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if you can get it so the legacy list encoding just calls this function with a parameter, that would be cleaner.

@mergify mergify bot removed the conflict label Nov 6, 2025
j-ororke and others added 4 commits November 6, 2025 14:26
- Add parameter names to AttributeWriteRequest calls in ChipDeviceCtrl.py for clarity
- Update type hints to show union of 2-tuple and 3-tuple formats
- Refactor ProcessWriteAttributesData in attribute.cpp to accept forceLegacyListEncoding parameter, eliminating code duplication between legacy and normal encoding paths
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41066: Size comparison from 791f872 to 2c38877

Full report (1 build for stm32)
platform target config section 791f872 2c38877 change % change
stm32 light STM32WB5MM-DK FLASH 470224 470232 8 0.0
RAM 141352 141352 0 0.0

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41066: Size comparison from 791f872 to f3f405e

Full report (1 build for stm32)
platform target config section 791f872 f3f405e change % change
stm32 light STM32WB5MM-DK FLASH 470224 470232 8 0.0
RAM 141352 141352 0 0.0

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41066: Size comparison from 791f872 to d10727e

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section 791f872 d10727e change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554906 554914 8 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587786 587794 8 0.0
RAM 205872 205872 0 0.0
realtek light-switch-app rtl8777g FLASH 706952 706960 8 0.0
RAM 106964 106964 0 0.0
lighting-app rtl8777g FLASH 757896 757904 8 0.0
RAM 127296 127296 0 0.0
stm32 light STM32WB5MM-DK FLASH 470224 470232 8 0.0
RAM 141352 141352 0 0.0

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

PR #41066: Size comparison from 791f872 to 7d3f430

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 791f872 7d3f430 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106340 1106354 14 0.0
RAM 178930 178930 0 0.0
bl702 lighting-app bl702+eth FLASH 661414 661428 14 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837008 837022 14 0.0
RAM 124445 124445 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070610 1070624 14 0.0
RAM 117317 117317 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 900042 900056 14 0.0
RAM 105612 105612 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983356 983370 14 0.0
RAM 109796 109796 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770820 770820 0 0.0
RAM 103360 103360 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782664 782672 8 0.0
RAM 108528 108528 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728612 728612 0 0.0
RAM 97420 97420 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713080 713080 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554906 554914 8 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587786 587794 8 0.0
RAM 205872 205872 0 0.0
efr32 lock-app BRD4187C FLASH 963504 963504 0 0.0
RAM 123572 123572 0 0.0
BRD4338a FLASH 757752 757752 0 0.0
RAM 254196 254196 0 0.0
window-app BRD4187C FLASH 1058820 1058820 0 0.0
RAM 119800 119800 0 0.0
esp32 all-clusters-app c3devkit DRAM 102572 102572 0 0.0
FLASH 1836720 1836850 130 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933452 933460 8 0.0
RAM 161377 161377 0 0.0
nxp contact mcxw71+release FLASH 692504 692512 8 0.0
RAM 61552 61552 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1678092 1678108 16 0.0
RAM 213956 213956 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1594492 1594508 16 0.0
RAM 211156 211156 0 0.0
light cy8ckit_062s2_43012 FLASH 1460732 1460732 0 0.0
RAM 197776 197776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1493420 1493420 0 0.0
RAM 225496 225496 0 0.0
qpg lighting-app qpg6200+debug FLASH 837768 837768 0 0.0
RAM 127768 127768 0 0.0
lock-app qpg6200+debug FLASH 774580 774596 16 0.0
RAM 118736 118736 0 0.0
realtek light-switch-app rtl8777g FLASH 706952 706960 8 0.0
RAM 106964 106964 0 0.0
lighting-app rtl8777g FLASH 757896 757904 8 0.0
RAM 127296 127296 0 0.0
stm32 light STM32WB5MM-DK FLASH 470224 470232 8 0.0
RAM 141352 141352 0 0.0
telink bridge-app tl7218x FLASH 710608 710622 14 0.0
RAM 90600 90600 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 797084 797098 14 0.0
RAM 41024 41024 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788286 788300 14 0.0
RAM 93700 93700 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715286 715300 14 0.0
RAM 51892 51892 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748582 748596 14 0.0
RAM 70932 70932 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725436 725450 14 0.0
RAM 34624 34624 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602672 602686 14 0.0
RAM 108928 108928 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820918 820936 18 0.0
RAM 92096 92096 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants